package com.homework2.demo3;

import java.util.HashSet;

public class test {
    public static void main(String[] args) {
        HashSet<Teacher> teachers = new HashSet<>();
        Teacher t1 = new Teacher("张三",18,3000);
        Teacher t2 = new Teacher("李四",20,5000);

        teachers.add(t1);
        teachers.add(t2);
        //teachers.add(t3);
        //teachers.add(t4);

        for (Teacher teacher:teachers){
            System.out.println(teacher);
        }

    }
}
